package June;

public class Test_6_1 {
    public static void main(String[] args) {
        //使用数组的训练

        double[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        double total = 0;
        for (int i = 0; i < arr.length; i++) {
            total += arr[i];
        }
        //用 数组名.length 来输出数组的长度
        System.out.println("总数 = " + total);
        System.out.println("平均数等于 = " + total / arr.length);
    }
}
